<?PHP
require("../config/connect.php");
require("../public/common.php");
require "../public/sendphone.php";

$phone = trim(CheckUrlParamNoDie("phone"));
if ($phone=="")
	exit;

// 发送手机验证码
srand((double)microtime()*1000000);
$rndcode = rand(1, 9).rand(1, 9).rand(1, 9).rand(1, 9);
mysql_query( "INSERT INTO phone_check (phone,code,time) VALUES ($phone,$rndcode,now()) ON DUPLICATE KEY UPDATE count=count+1,code=$rndcode,time=now()" );

$msg="购物兔手机验证码为：".$rndcode."，感谢您使用购物兔，喜悦请分享给您的朋友；埋怨请留给我们客服【购物兔】";
// echo $msg;
SendPhone($phone, $msg);
?>